package networking.messages.playerMessages;

import logic.common.player.Player;
import logic.common.team.Fraction;
import networking.messages.SimpleMessage;

public class PlayerRegisterMessage extends SimpleMessage {
	
	protected Fraction fraction, enemyFraction;
	protected String playerName;
	
	public PlayerRegisterMessage() {
		super();
	}
	
	public PlayerRegisterMessage(Player player) {
		this();
		playerName = player.getName();
		fraction = player.getTeam().getFraction();
		enemyFraction = player.getEnemyTeam().getFraction();
	}
	
	public Fraction getFraction() {
		return fraction;
	}
	
	public Fraction getEnemyFraction() {
		return enemyFraction;
	}
	
	public String getPlayerName() {
		return playerName;
	}
}